#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@author:jidi
@file:session.py
@time:2022/08/15
"""
from homework.litemall.model.user import User
from homework.litemall.uitls.data import Data


class Session:
    _access_token = None

    def __init__(self, user: User):
        env = Data.load_yaml('data/user.yaml')
        user.username = env['username']
        user.password = env['password']
        self._access_token = self.refresh_token(user)

    def refresh_token(self, user: User):
        ...

    def get_token(self):
        return self._access_token
